/*DoLHh4mLYM4iYb1kEqrmZUh6HDKTYOQ1aM4S7r+l+bsdHa0UfrJyxoaKecaefKKCZGkPRuU4s7V1
3w3c0f/w+A==*/
/*
 * @Author: xiahui 
 * @PageInfo: 批量合同控制范围调整 
 * @Date: 2019-02-26 13:52:37 
 * @Last Modified by: xiahui
 * @Last Modified time: 2019-07-10 15:52:24
 */
import { AREA, FIELDS } from '../../constance';
import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';

export default function(props) {
	let checkArr = props.table.getCheckedRows(AREA.listTableId);
	if (!checkArr || checkArr.length < 1) {
		showWarningInfo(null, getLangByResId(this, '4004PURDAILY-000058')); /* 国际化处理： 请选择数据*/
		return;
	}

	let checkPks = [];
	checkArr.map((row) => {
		checkPks.push(row.data.values[FIELDS.pk_ct_pu].value);
	});

	this.setState({
		pk: checkPks,
		showControl: !this.state.showControl,
		isBatchControl: true
	});
}

/*DoLHh4mLYM4iYb1kEqrmZUh6HDKTYOQ1aM4S7r+l+bsdHa0UfrJyxoaKecaefKKCZGkPRuU4s7V1
3w3c0f/w+A==*/